#所有.c文件一起编译，最后生成一个可执行文件

CC = gcc
CFLAGS = -Wall -O0 -g
SRC = $(shell ls *.c)
OBJ = $(patsubst %.c,%.o,$(SRC))
APP = client

all :$(APP)

$(APP): $(OBJ)
	$(CC) $(CFLAGS) -o $@ $^ -lm -lpthread
	
#%.o: %.c
#	$(CC) $(CFLAGS) -c -o $@ $< -lm -lpthread

clean: 
	$(RM) $(APP) *.o
.PHONY: clean

